//
//  WuLiuDetail.m
//  DPGJ
//
//  Created by ZhuoLaiQiang@Gmail.com on 11-12-1.
//  Copyright (c) 2011年 __MyCompanyName__. All rights reserved.
//

#import "WuLiuDetail.h"
#import "CONSTS.h"


@implementation WuLiuDetail

//一。货物名称
@synthesize  item_title;				//货物名称

//二。物流信息
@synthesize  type;//					物流方式
@synthesize  order_code;//			物流编号
@synthesize  company_name;//			物流公司名称
@synthesize  out_sid;//				运单号
@synthesize  status;//				物流订单状态
@synthesize  freight_payer;//			谁承担运费
@synthesize  seller_confirm;//			卖家是否确认发货
@synthesize  is_success;//				返回发货是否成功。

//三。下单信息
@synthesize  created;//				订单创建
@synthesize  modified;//				运单修改时间

//四。物流跟踪
@synthesize  wuLiuInfo;//信息由物流公司提供

//五。收货信息
@synthesize  buyer_nick;//			买家昵称
@synthesize  location;//				收件人地址信息(在传输请求参数Fields字段时，必须使用“receiver_location”才能返回此字段)
@synthesize  receiver_name;//			收件人姓名
@synthesize  receiver_phone;//			收件人电话
@synthesize  receiver_mobile;//			收件人手机号码

//六。预约取货时间
@synthesize  delivery_start;//			预约取货开始时间
@synthesize  delivery_end;//

- (id)init
{
    self = [super init];
    if (self)
    {
        self.wuLiuInfo = @"点击查看 物流跟踪 详情";
    }
    
    return self;
}

- (void)dealloc
{
    //一。货物名称
    LF_RELEASE_SAFELY(item_title);
    
    //二。物流信息
    LF_RELEASE_SAFELY(type);
    LF_RELEASE_SAFELY(order_code);
    LF_RELEASE_SAFELY(company_name);
    LF_RELEASE_SAFELY(out_sid);
    LF_RELEASE_SAFELY(status);
    LF_RELEASE_SAFELY(freight_payer);
    LF_RELEASE_SAFELY(seller_confirm);
    LF_RELEASE_SAFELY(is_success);
    
    //三。下单信息
    LF_RELEASE_SAFELY(created);
    LF_RELEASE_SAFELY(modified);
    
    //四。物流跟踪
    LF_RELEASE_SAFELY(wuLiuInfo);
    
    //五。收货信息
    LF_RELEASE_SAFELY(buyer_nick);
    LF_RELEASE_SAFELY(location);
    LF_RELEASE_SAFELY(receiver_name);
    LF_RELEASE_SAFELY(receiver_phone);
    LF_RELEASE_SAFELY(receiver_mobile);
    
    //六。预约取货时间
    LF_RELEASE_SAFELY(delivery_start);
    LF_RELEASE_SAFELY(delivery_end);
    
    [super dealloc];
}

- (NSString *)verfiyValue:(NSString *)value_
{
    if (!value_ || [value_ isEqualToString: @""])
    {
        value_ = WUL_LIU_DETAIL_CELL_DEFAULT_TEXT;
    }
    
    return [value_ retain];
}

- (void)setItem_title:(NSString *)item_title_
{
   item_title = [self verfiyValue: item_title_];
}

- (void)setType:(NSString *)type_
{
    type = [self verfiyValue: type_];
}
 
- (void)setOrder_code:(NSString *)order_code_
{
    order_code = [self verfiyValue: order_code_];
}

- (void)setCompany_name:(NSString *)company_name_
{
    company_name = [self verfiyValue: company_name_];
}

- (void)setOut_sid:(NSString *)out_sid_
{
    out_sid = [self verfiyValue: out_sid_];
}

- (void)setStatus:(NSString *)status_
{
    status = [self verfiyValue: status_];
}

- (void)setFreight_payer:(NSString *)freight_payer_
{
    freight_payer = [self verfiyValue: freight_payer_];
}

- (void)setSeller_confirm:(NSString *)seller_confirm_
{
    seller_confirm = [self verfiyValue: seller_confirm_];
}

- (void)setIs_success:(NSString *)is_success_
{
    is_success = [self verfiyValue: is_success_];
}

//三。下单信息
- (void)setCreated:(NSString *)created_
{
    created = [self verfiyValue: created_];
}

- (void)setModified:(NSString *)modified_
{
    modified = [self verfiyValue: modified_];
}

//五。收货信息
- (void)setBuyer_nick:(NSString *)buyer_nick_
{
    buyer_nick = [self verfiyValue: buyer_nick_];
}

- (void)setLocation:(Location *)location_
{
    location = [location_ retain];
}

- (void)setReceiver_name:(NSString *)receiver_name_
{
    receiver_name = [self verfiyValue: receiver_name_];
}

- (void)setReceiver_phone:(NSString *)receiver_phone_
{
    receiver_phone = [self verfiyValue: receiver_phone_];
}

- (void)setReceiver_mobile:(NSString *)receiver_mobile_
{
    receiver_mobile = [self verfiyValue: receiver_mobile_];
}

//六。预约取货时间
- (void)setDelivery_start:(NSString *)delivery_start_
{
    delivery_start = [self verfiyValue: delivery_start_];
}

- (void)setDelivery_end:(NSString *)delivery_end_
{
    delivery_end = [self verfiyValue: delivery_end_];
}

@end
